function [LO_R,HI_R] = mywfilters(wavname)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% Copyright 2016 Boualem Boashash
%
% Licensed under the Apache License, Version 2.0 (the "License");
% you may not use this file except in compliance with the License.
% You may obtain a copy of the License at
%
%     http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS,
% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
% See the License for the specific language governing permissions and
% limitations under the License.
%
% Authors: Prof. Boualem Boashash   (boualem.boashash@gmail.com)
%          Samir Ouelha             (samir_ouelha@hotmail.fr)
%          
% The following references should be cited whenever this script is used:
% [1] B. Boashash, Samir Ouelha, Designing high-resolution time-frequency
% and time-scale distributions for the analysis and  classification of non 
% stationary signals: a tutorial review with features performance comparison
%, Digital Signal Processing, In Press.
% [2] B. Boashash, Samir Ouelha, Efficient Software Matlab Package to compute
% Time-Frequency Distributions and related Time-Scale methods with extraction
% of signal characteristics, SoftwareX, In Press.
%
% This study was funded by grants from the ARC and QNRF NPRP 6-885-2-364
% and NPRP 4-1303-2-517 
%   
% Last Modification: 25-12-2016
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Description:
%
% This function give high-pass and low-pass filters of Daubechies
% wavelets to avoid to use the Wavelet toolboox from Matlab.
% Input: wavname: name of the wavelets.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


if strcmp(wavname,'db1')
    LO_R = [0.707106781186548   0.707106781186548];
    HI_R = [0.707106781186548  -0.707106781186548];
elseif strcmp(wavname,'db2')
    LO_R = [0.482962913144690   0.836516303737469  ...
        0.224143868041857  -0.129409522550921];
    HI_R = [-0.129409522550921  -0.224143868041857 ...
        0.836516303737469  -0.482962913144690];
elseif strcmp(wavname,'db3')
    LO_R = [0.332670552950957   0.806891509313339 ...
       0.459877502119331  -0.135011020010391 ...
      -0.085441273882241   0.035226291882101];
    HI_R = [0.035226291882101   0.085441273882241 ...
      -0.135011020010391  -0.459877502119331 ...
      0.806891509313339  -0.332670552950957];
elseif strcmp(wavname,'db4')
    LO_R = [0.230377813308855   0.714846570552542 ...
       0.630880767929590  -0.027983769416984 ...
      -0.187034811718881   0.030841381835987 ...
       0.032883011666983  -0.010597401784997];
    HI_R = [-0.010597401784997  -0.032883011666983 ...
       0.030841381835987   0.187034811718881 ...
      -0.027983769416984  -0.630880767929590 ...
       0.714846570552542  -0.230377813308855];  
elseif strcmp(wavname,'db5')
    LO_R = [0.160102397974125   0.603829269797473 ...
       0.724308528438574   0.138428145901103 ...
      -0.242294887066190  -0.032244869585030 ...
       0.077571493840065  -0.006241490213012 ...
      -0.012580751999016   0.003335725285002];
    HI_R = [0.003335725285002   0.012580751999016 ...
      -0.006241490213012  -0.077571493840065 ...
      -0.032244869585030   0.242294887066190 ...
       0.138428145901103  -0.724308528438574 ...
       0.603829269797473  -0.160102397974125];
elseif strcmp(wavname,'db6')
LO_R = [0.111540743350080   0.494623890398385 ...
       0.751133908021578   0.315250351709243 ...
      -0.226264693965169  -0.129766867567096 ...
       0.097501605587079   0.027522865530016 ...
      -0.031582039318031   0.000553842200994 ...
       0.004777257511011  -0.001077301084996];
HI_R = [-0.001077301084996  -0.004777257511011 ...
       0.000553842200994   0.031582039318031 ...
       0.027522865530016  -0.097501605587079 ...
      -0.129766867567096   0.226264693965169 ...
       0.315250351709243  -0.751133908021578 ...
       0.494623890398385  -0.111540743350080];    
end
